﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UtilZ.Dotnet.Ex.Base;
using UtilZ.Dotnet.Ex.DataStruct;

namespace ConAppCore.Test
{
    internal class TestArrayEx
    {
        public static void Test()
        {
            ArrayZ<int> array = new ArrayZ<int>(6);
            int count = 4;

            if (!array.Check(count))
            {
                array.ThrowAdjustFailException();
            }
            array.SetLength(0, count);

            for (int i = 0; i < count; i++)
            {
                array[i] = i + 1;
            }

            Console.WriteLine("--------------------");

            foreach (var value in array)
            {
                Console.WriteLine(value);
            }

            Console.WriteLine("--------------------");

            foreach (var value in array)
            {
                Console.WriteLine(value);
            }
        }
    }
}
